package com.xxxy.dongyexuan.mapper;

import com.xxxy.dongyexuan.po.Level;
import com.xxxy.dongyexuan.po.Project;
import org.apache.ibatis.annotations.*;
import org.mybatis.spring.annotation.MapperScan;

import java.util.List;

@MapperScan("com.xxxy.dongyexuan.demobeautyhaird.mapper")
public interface ILevelMapper {
    @Select("select count(*) from level")
    public int getcount();

    @Select("SELECT * FROM level WHERE lid = #{lid}")
    public Level findById(@Param("lid") int lid);

    @Select("SELECT * FROM level")
    public List<Level> findAll();

    @Insert("INSERT level VALUES (#{lid}, #{lname})")
    public int save(Level level);

    @Update("UPDATE level SET lname = #{lname} WHERE lid = #{lid}")
    public int merge(Level level);

    @Delete("DELETE FROM level WHERE lid = #{lid}")
    public int delete(@Param("lid") int lid);
    @Select("select * from level limit #{from},#{pagesize}")
    public List<Level> findByPage(@Param("from") int from, @Param("pagesize") int pagesize);
}
